package com.sun.wms.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class User {
    @TableId(type= IdType.AUTO)//设置主键生成策略为自增
    private Integer id;
    private String no;
    private String name;
    private String password;
    private Integer age;
    /**
     * 0女，1男
     */
    private Integer sex;
    private String phone;
    /**
     * 0超级管理员，1管理员，2普通用户
     */
    private Integer roleId;
    @TableField(value = "isValid")//默认驼峰会自动映射为is_valid，所以需要显示表明
    private String isValid;

    public User(String no, String name, String password, int age, int sex, String phone, int roleId, String isValid) {
        this.no = no;
        this.name = name;
        this.password = password;
        this.age = age;
        this.sex = sex;
        this.phone = phone;
        this.roleId = roleId;
        this.isValid = isValid;
    }
}

